package com.woody.aggregate.app.web.advice;

/**
 * @author hzy
 * @date 2025/1/2 上午11:01
 */

import cn.hutool.json.JSONUtil;
import com.woody.common.sercurity.interceptor.LoginUserInfo;
import com.woody.common.sercurity.interceptor.UserInfoContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 抽象控制器
 * @author hzy
 * @date 2023/7/4 下午5:53
 */
@Component
@Slf4j
public class AbstractAggregateController {



    public Long getLifeUserId(){
        LoginUserInfo loginUserInfo = UserInfoContext.get();
        log.info("loginUserInfo:{}", JSONUtil.toJsonStr(loginUserInfo));
        return loginUserInfo.getUserId();
    }
}
